{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 5.11. Performing out-of-core computations on large arrays with Dask"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import dask.array as da\n",
    "import memory_profiler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext memory_profiler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "Y = da.random.normal(size=(10000, 10000),\n",
    "                     chunks=(1000, 1000))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dask.array<da.random.normal, shape=(10000, 10000),\n",
       "    dtype=float64, chunksize=(1000, 1000)>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((10000, 10000),\n",
       " 100000000,\n",
       " ((1000, ..., 1000),\n",
       "  (1000, ..., 1000)))"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Y.shape, Y.size, Y.chunks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dask.array<mean_agg-aggregate, shape=(10000,),\n",
       "    dtype=float64, chunksize=(1000,)>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mu = Y.mean(axis=0)\n",
    "mu"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.011"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mu[0].compute()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def f_numpy():\n",
    "    X = np.random.normal(size=(10000, 10000))\n",
    "    x = X.mean(axis=0)[0:100]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "peak memory: 916.32 MiB, increment: 763.00 MiB\n"
     ]
    }
   ],
   "source": [
    "%%memit\n",
    "f_numpy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 3.86 s, sys: 664 ms, total: 4.52 s\n",
      "Wall time: 4.52 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "f_numpy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "def f_dask():\n",
    "    Y = da.random.normal(size=(10000, 10000),\n",
    "                         chunks=(1000, 1000))\n",
    "    y = Y.mean(axis=0)[0:100].compute()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "peak memory: 221.42 MiB, increment: 67.64 MiB\n"
     ]
    }
   ],
   "source": [
    "%%memit\n",
    "f_dask()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 492 ms, sys: 12 ms, total: 504 ms\n",
      "Wall time: 105 ms\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "f_dask()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "def f_dask2():\n",
    "    Y = da.random.normal(size=(10000, 10000),\n",
    "                         chunks=(10000, 100))\n",
    "    y = Y.mean(axis=0)[0:100].compute()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "peak memory: 145.60 MiB, increment: 6.93 MiB\n"
     ]
    }
   ],
   "source": [
    "%%memit\n",
    "f_dask2()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 48 ms, sys: 8 ms, total: 56 ms\n",
      "Wall time: 57.4 ms\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "f_dask2()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "from dask.distributed import Client"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "client = Client()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "client"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4090.221"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Y.sum().compute()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "future = client.compute(Y.sum())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "podoc": {
     "output_text": "Future"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABlkAAABNEAAAAABQAoH+AAAJJGlDQ1BpY2MAAHjalZVnUJNZF8fv\n8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEUQUUDBVSmyVkSxsCgoYkE3yCKgrBtX\nERWUF/Sd0Xnf2Q/7n7n3/OY/Z+4995wPFwCC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3tMzvDYVcMR2b4avfJTcor2xtCjcQAAAEAHIQsA\n4AuJjw3dVYORl82Pjzt9J9aDeeLXOAAAAGCBkAUA8KUM70cSPlTP3ggn+8gBkJhO9NfFo3EAAACg\nBtwAAAAAAAAAwIxByAIAAAAAAACYMQhZAAAAAAAAADMGIQsAAAAAAABgxiBkAQAAAAAAAMwYhCwA\nAAAAAACAGYOQBQAAAAAAADBjELIAAAAAAAAAZgxCFgAAAAAAAMCMQcgCAAAAAAAAmDEIWQAAAAAA\nAAAzBiELAAAAAAAAYMYgZAEAAAAAAADMGIQsAAAAAAAAgBmDkAUAAAAAAAAwYxCyAAAAAAAAAGYM\nQhYAAAAAAADAjEHIAgAAAAAAAJgxCFkAAAAAAAAAMwYhCwAAAAAAAGDG/D+uazo+kgvAkQAAACV0\nRVh0ZGF0ZTpjcmVhdGUAMjAxNy0wOS0yN1QxNTowMDozOSswMjowMNkYTD4AAAAldEVYdGRhdGU6\nbW9kaWZ5ADIwMTctMDktMjdUMTU6MDA6MzkrMDI6MDCoRfSCAAAAIHRFWHRwZGY6SGlSZXNCb3Vu\nZGluZ0JveAA1OTV4ODQyKzArMDsfVVwAAAAfdEVYdHBkZjpWZXJzaW9uAFBERi0xLjQgMSAwIG9i\naiA8PCCeMHjFAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "Future"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "future"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4090.221"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "future.result()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Size in memory: 1117.6 GB'"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "huge = da.random.uniform(\n",
    "    size=(1500000, 100000), chunks=(10000, 10000))\n",
    "\"Size in memory: %.1f GB\" % (huge.nbytes / 1024 ** 3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[##                   ] | 11% Completed |  1min 44.8s\n"
     ]
    }
   ],
   "source": [
    "from dask.diagnostics import ProgressBar\n",
    "# WARNING: this will take a very long time computing\n",
    "# useless values. This is for pedagogical purposes\n",
    "# only.\n",
    "with ProgressBar():\n",
    "    m = huge.mean().compute()"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 2
}
